﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace WpfApp6
{
    public class MainViewModel:ViewModelBase
    {
        public MyCommand myCommand { get; set; }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value;
            }
        }


        public MainViewModel()
        {
            Name = "Hello";
            myCommand = new MyCommand(Show1);
            myCommand._exeCuteAction += Show2;
            myCommand._exeCuteAction += Show3;
        }

        public void Show1()
        {
            Name = "点击了按钮";
            MessageBox.Show("点击了按钮1");
        }

        public void Show2()
        {
            MessageBox.Show("点击了按钮2");
        }

        public void Show3()
        {
            MessageBox.Show("点击了按钮3");
        }
    }
}
